package com.wskj.controller;


import com.wskj.base.Result;
import com.wskj.entity.Supplier;
import com.wskj.service.ISupplierService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 供应商信息表 前端控制器
 * </p>
 *
 * @author 顽石教育-www.wskj.com
 * @since 2021-09-07
 */
@RestController
@RequestMapping("//supplier")
public class SupplierController {

    @Autowired
     private ISupplierService supplierService;
@GetMapping("/{id}")
public Result findById(@PathVariable Integer id){
   Supplier supplier = supplierService.findById(id);
return Result.ok(supplier);
}
//    @GetMapping("/user/{supid}")
//    public Result findBySupplierId(@PathVariable String supid){
//   List<Supplier> suppliers = supplierService.findBySupplierId(supid);
//    return Result.ok(suppliers);
//    }
}
